package org.dtrd.modules.common.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.dtrd.modules.common.entity.bean.PatientListInfo;
import org.dtrd.modules.common.entity.po.DtrdViewRlGroupPatient;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * VIEW Mapper 接口
 * </p>
 *
 * @author QR
 * @since 2021-10-07
 */
@Mapper
@DS("multi-datasource1")
public interface DtrdViewRlGroupPatientMapper extends BaseMapper<DtrdViewRlGroupPatient> {

    /**
     * 根据条件分页获取患者列表
     */
    IPage<PatientListInfo> listPatientInfo(Page<?> page,
                                           @Param("phone") String phone,
                                           @Param("name") String name,
                                           @Param("groupId") Integer groupId,
                                           @Param("status") Integer status,
                                           @Param("startDate") Date startDate,
                                           @Param("endDate") Date endDate,
                                           @Param("patientIds") List<Integer> patientIds,
                                           @Param("patientName") String patientName,
                                           @Param("patientMobile") String patientMobile);

    IPage<PatientListInfo> selectPatientInfo(Page<?> page,
                                             @Param("doctorIdList") List<Integer> doctorIdList,
                                             @Param("groupId") Integer groupId,
                                             @Param("status") Integer status,
                                             @Param("startDate") Date startDate,
                                             @Param("patientIds") List<Integer> patientIds,
                                             @Param("patientName") String patientName,
                                             @Param("name") String name,
                                             @Param("patientMobile") String patientMobile,
                                             @Param("phone") String phone);
}
